<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>在线点餐系统管理平台</title>
<link rel="stylesheet" href="${pageContext.request.contextPath }/admin/css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/admin/css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/admin/css/invalid.css" type="text/css" media="screen" />
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/scripts/simpla.jquery.configuration.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/scripts/facebox.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/scripts/jquery.wysiwyg.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/scripts/jquery.datePicker.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/scripts/jquery.date.js"></script> 
<script type="text/javascript">
	function goPage(toPage){
		var frm = document.getElementById("frmPage");
		frm["pageObj.currPage"].value=toPage;
		frm.submit();
	}
</script>
</head>
  <body>
  <%-- 加载左边菜单 --%>
  <s:include value="../main/left.jsp?mid=m42"></s:include>
  
  <div class="clear"></div>
  <div id="main-content">
  
   <!-- Box Content -->
   <div class="content-box">
   
    <!-- Box Header -->
		<div class="content-box-header">
	    <h3>公司列表</h3>
	    <div class="clear"></div>
  	</div>
  	<!-- End Box header -->
  
  	<!-- Table Content -->
  	<div class="tab-content">
  		<table>
  			<thead>
  				<tr>
  					<th><input class="check-all" type="checkbox" /></th>
            <th>编号</th>
            <th>姓名</th>
            <th>登录账号</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tfoot>
          <tr>
            <td colspan="6">
              <div class="bulk-actions align-left"><a class="button" href="#">删&nbsp;&nbsp;除</a></div>
              
              <div class="pagination">
              <s:form action="userManager!list" namespace="/admin" id="frmPage">
              <s:textfield name="pageObj.currPage" size="1"/>/${pageObj.allPages }页，每页显示${pageObj.rows }行，共${pageObj.allRows }行
							<input type="submit" value="GO!"/>
							
							<a href="javascript:goPage('1')">&laquo; 首页</a>
							<s:if test="pageObj.hasPrePage">
							<a href="javascript:goPage('${pageObj.prePage }')">&laquo; 上一页</a>
							</s:if>
							<s:if test="pageObj.hasNextPage">
							<a href="javascript:goPage('${pageObj.nextPage }')">下一页 &raquo;</a>
							</s:if>
							<a href="javascript:goPage('${pageObj.allPages }')">尾页 &raquo;</a>
							</s:form>
              </div>
              <!-- End .pagination -->
              <div class="clear"></div>
            </td>
          </tr>
        </tfoot>
        <tbody>
        <s:iterator value="pageObj.results" var="temp">
	  		<tr>
	  		  <td><input type="checkbox" /></td>
  			  <td>${temp.id }</td>
  			  <td>${temp.username }</td>
  			  <td>${temp.login }</td>
  			  <td>
  			  	<s:if test="#temp.state==1">
  			  	<lable style="color:blue">正常</lable>
  			  	</s:if>
  			  	<s:elseif test="#temp.state==2">
  			  	<lable style="color:green">停用</lable>
  			  	</s:elseif>
  			  	<s:else>
  			  	<lable style="color:gray">异常</lable>
  			  	</s:else>
  			  </td>
  			  <td>
						<a href="#" title="编辑"><img src="${pageContext.request.contextPath }/admin/images/icons/pencil.png" alt="编辑" /></a> 
						<a href="#" title="删除"><img src="${pageContext.request.contextPath }/admin/images/icons/cross.png" alt="删除" /></a> 
						<a href="#" title="详细信息"><img src="${pageContext.request.contextPath }/admin/images/search.gif" alt="详细" /></a>
					</td>
	  		</tr>
		  	</s:iterator>
        </tbody>
			</table>
     </div>
     <!-- End Table Content -->
     
   </div>
   <!-- End Box Content -->
   
  <div class="clear"></div>
  <%-- 加载底部 --%>
  <s:include value="../main/footer.jsp"></s:include>
  </body>
</html>
